/****

    activequant - activestocks.eu

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

	
	contact  : contact@activestocks.eu
    homepage : http://www.activestocks.eu

 ****/
package org.activequant.calendar;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.TimeZone;

/**
 * Settings for holidays for the Euro Bund Future (FGBL). <br/>
 * FGBLHolidayCalendarSettings implements IHolidayCalendarSettings. Holds the following associated variables:
 * <ul>
 * <li>TIMEZONE(TimeZone) (TimeZone.getTimeZone("Europe/Berlin"))</li>
 * <li>holidayCalendarSettings(FGBLHolidayCalendarSettings)</li>
 * </ul>
 * <b>History:</b><br>
 * - [May 31, 2008] Created (mark)<br>
 * - [Sep 14, 2008] completed and renamed to FGBLHolidayCalendarSettings (mark)<br>
 * 
 * @author mark
 */
public class FGBLHolidayCalendarSettings implements IHolidayCalendarSettings {
	/**
	 * private static final TimeZone TIMEZONE = TimeZone.getTimeZone("Europe/Berlin");
	 */
	private static final TimeZone TIMEZONE = TimeZone.getTimeZone("Europe/Berlin");

	private static final long serialVersionUID = 3441754329515158380L;
	/**
	 * private static final FGBLHolidayCalendarSettings holidayCalendarSettings = new FGBLHolidayCalendarSettings();
	 */
	private static final FGBLHolidayCalendarSettings holidayCalendarSettings = new FGBLHolidayCalendarSettings();

	/**
	 * Gets a instance for the holiday calendar settings<br/>
	 * returns the associated holidayCalendarSettings(FGBLHolidayCalendarSettings)
	 * @return the instance for the settings
	 */
	public static synchronized FGBLHolidayCalendarSettings getInstance() {
		return holidayCalendarSettings;
	}
	/**
	 * an empty private FGBLHolidayCalendarSettings (implements IHolidayCalendarSettings) constructor
	 */
	private FGBLHolidayCalendarSettings() {
		// Instantiation not allowed
	}
	/**
	 * returns a List&lt;HolidayCalendarEntry&gt; defining HolidayCalendarEntries for recurring (fixed date) and varying holidays 
	 */
	public final List<HolidayCalendarEntry> getHolidays() {
		final ArrayList<HolidayCalendarEntry> list = new ArrayList<HolidayCalendarEntry>();

		final int asOfYear = 2001;

		// Recurring fixed date holidays (All years)
		list.add(new HolidayCalendarEntry(asOfYear, Calendar.JANUARY, 1, TIMEZONE));
		list.add(new HolidayCalendarEntry(asOfYear, Calendar.MAY, 1, TIMEZONE));
		list.add(new HolidayCalendarEntry(asOfYear, Calendar.DECEMBER, 24, TIMEZONE));
		list.add(new HolidayCalendarEntry(asOfYear, Calendar.DECEMBER, 25, TIMEZONE));
		list.add(new HolidayCalendarEntry(asOfYear, Calendar.DECEMBER, 26, TIMEZONE));
		list.add(new HolidayCalendarEntry(asOfYear, Calendar.DECEMBER, 31, TIMEZONE));

		// Eastern 1998
		list.add(new HolidayCalendarEntry(1998, 1998, Calendar.APRIL, 10, TIMEZONE));
		list.add(new HolidayCalendarEntry(1998, 1998, Calendar.APRIL, 13, TIMEZONE));

		// Eastern 1999
		list.add(new HolidayCalendarEntry(1999, 1999, Calendar.APRIL, 2, TIMEZONE));
		list.add(new HolidayCalendarEntry(1999, 1999, Calendar.APRIL, 5, TIMEZONE));

		// Eastern 2000
		list.add(new HolidayCalendarEntry(2000, 2000, Calendar.APRIL, 21, TIMEZONE));
		list.add(new HolidayCalendarEntry(2000, 2000, Calendar.APRIL, 24, TIMEZONE));

		// Eastern 2001
		list.add(new HolidayCalendarEntry(2001, 2001, Calendar.APRIL, 13, TIMEZONE));
		list.add(new HolidayCalendarEntry(2001, 2001, Calendar.APRIL, 16, TIMEZONE));

		// Eastern 2002
		list.add(new HolidayCalendarEntry(2002, 2002, Calendar.MARCH, 29, TIMEZONE));
		list.add(new HolidayCalendarEntry(2002, 2002, Calendar.APRIL, 1, TIMEZONE));

		// Eastern 2003
		list.add(new HolidayCalendarEntry(2003, 2003, Calendar.APRIL, 18, TIMEZONE));
		list.add(new HolidayCalendarEntry(2003, 2003, Calendar.APRIL, 21, TIMEZONE));

		// Eastern 2004
		list.add(new HolidayCalendarEntry(2004, 2004, Calendar.APRIL, 9, TIMEZONE));
		list.add(new HolidayCalendarEntry(2004, 2004, Calendar.APRIL, 12, TIMEZONE));

		// Eastern 2005
		list.add(new HolidayCalendarEntry(2005, 2005, Calendar.MARCH, 25, TIMEZONE));
		list.add(new HolidayCalendarEntry(2005, 2005, Calendar.MARCH, 28, TIMEZONE));

		// Eastern 2006
		list.add(new HolidayCalendarEntry(2006, 2006, Calendar.APRIL, 14, TIMEZONE));
		list.add(new HolidayCalendarEntry(2006, 2006, Calendar.APRIL, 17, TIMEZONE));

		// Eastern 2007
		list.add(new HolidayCalendarEntry(2007, 2007, Calendar.APRIL, 6, TIMEZONE));
		list.add(new HolidayCalendarEntry(2007, 2007, Calendar.APRIL, 9, TIMEZONE));

		// Eastern 2008
		list.add(new HolidayCalendarEntry(2008, 2008, Calendar.MARCH, 21, TIMEZONE));
		list.add(new HolidayCalendarEntry(2008, 2008, Calendar.MARCH, 24, TIMEZONE));

		// Eastern 2009
		list.add(new HolidayCalendarEntry(2009, 2009, Calendar.APRIL, 10, TIMEZONE));
		list.add(new HolidayCalendarEntry(2009, 2009, Calendar.APRIL, 13, TIMEZONE));

		return list;
	}
	/**
	 * returns the associated TIMEZONE(TimeZone) (TimeZone.getTimeZone("Europe/Berlin"))
	 */
	public TimeZone getTimeZone() {
		return TIMEZONE;
	}
}
